package com.ijunfu.spring.bean._04_bean_controller_advice.contoller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

/**
 *
 * @title  : 
 * @author : ijunfu <ijunfu@163.com>
 * @date   : 2023/10/31 17:38
 * @version: 1.0
 * @motto  : 位来可期 - 世界很大，我想看看
 *
 */
@Slf4j
@RestController
@RequestMapping("/sys")
public class SysController {

    @GetMapping("/info")
    public String systemInfo(@RequestBody MyForm form) {
        log.info("name={}\t\tdate={}", form.getName(), form.getDate());

        return "Ok!";
    }

    // 测试异常
    @GetMapping("/error")
    public String error() {

        throw new IllegalArgumentException();
    }


}
